package com.hzw.saas.web.im.im;

import io.netty.channel.Channel;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker;
import io.netty.util.concurrent.GlobalEventExecutor;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 连接相关信息
 * @author sonam
 * @sine 2021/10/21 9:49 上午
 */
public class ImContext {
    public static Map<String, WebSocketServerHandshaker> webSocketHandShakerMap = new ConcurrentHashMap<>();
    public static ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);//channel group线程池
    //用户-管道连接池
    public static ConcurrentHashMap<String, Channel> userChannel = new  ConcurrentHashMap();

}
